package com.ouyy.volunteerservice.volunteer.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ouyy.volunteerservice.volunteer.domain.po.InfoNotice;
import com.ouyy.volunteerservice.volunteer.mapper.InfoNoticeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InfoNoticeService extends ServiceImpl<InfoNoticeMapper, InfoNotice> {
    // 这里已经继承了基本的 CRUD 操作，无需额外实现，除非需要自定义逻辑
    private final InfoNoticeMapper infoNoticeMapper;

    @Autowired
    public InfoNoticeService(InfoNoticeMapper infoNoticeMapper) {
        this.infoNoticeMapper = infoNoticeMapper;
    }

    // 增加点击数
    public void incrementClickCount(Integer articleId) {
        infoNoticeMapper.incrementClickCount(articleId);
    }

}
